package com.xcjh.smartchat.ui

import android.os.Bundle
import androidx.activity.viewModels
import com.gyf.immersionbar.ImmersionBar
import com.xcjh.base_lib.Constants
import com.xcjh.base_lib.base.container.ContainerFm2Activity
import com.xcjh.smartchat.base.BaseActivity
import com.xcjh.smartchat.databinding.ChatActivityMainBinding
import com.xcjh.smartchat.ui.login.LoginFragment
import com.xcjh.smartchat.vm.MainVm


class MainActivity : BaseActivity<MainVm, ChatActivityMainBinding>() {
    private val model: MainVm by viewModels()

   /* override fun onCreate(savedInstanceState: Bundle?) {
        super.onCreate(savedInstanceState)
        setContentView(R.layout.chat_activity_main)

       // startNewActivity<Main2Activity>()
    }*/

    override fun initView(savedInstanceState: Bundle?) {
        ImmersionBar.with(this)
            .statusBarDarkFont(true)
            .titleBarMarginTop(mViewBind.topTv)
            .statusBarColor(android.R.color.transparent)
            .init()
        model.getData()
        mViewBind.topTv.setOnClickListener {
            ContainerFm2Activity().startContainer2Activity(this, LoginFragment())
        }
    }

    override fun createObserver() {
        super.createObserver()
    }
}